//
//  main.swift
//  15.结构体和类
//
//  Created by 左忠飞 on 2021/8/4.
//

//import Foundation


var myTown = Town()
myTown.population = 1000
myTown.printDescription()

myTown.changePopulation(by: 500)
//myTown.printDescription()
//
//let genericMonster = Monster()
//genericMonster.town = myTown
//genericMonster.terrorizeTown()


let fredTheZombie = Zombie()
fredTheZombie.town = myTown
fredTheZombie.terrorizeTown()
fredTheZombie.town?.printDescription()


print(Zombie.makeSpookNoise())
